import { createRoot } from "react-dom/client";
import "./index.css";
import store from "./store/index.js";
import { Provider } from "react-redux";
import App from "./App.jsx";
import { BrowserRouter } from "react-router-dom";

createRoot(document.getElementById("root")).render(
  <Provider store={store}>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </Provider>,
);

import { initGlobalState, registerMicroApps, start } from "qiankun";

//注册子应用
registerMicroApps([
  {
    name: "vue3-xiaoMan",
    entry: "//localhost:5173/myApp/pageA", //嵌嵌入链接
    container: "#micro-app", //挂载节点
    activeRule: "/myApp/pageA", //激活规则 以什么路由显示
  },
]);
start();
